# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-tenacity
pkgver=8.2.3
_commit=41ed2420cda8ab7650a39900451099f4730266c3
pkgrel=1
pkgdesc='Retry code until it succeeeds'
arch=('any')
license=('Apache')
url='https://github.com/jd/tenacity'
depends=('python')
optdepends=('python-tornado: for Tornado coroutines support')
makedepends=('git' 'python-setuptools-scm')
checkdepends=('python-pytest' 'python-tornado' 'python-typeguard')
source=("git+https://github.com/jd/tenacity.git#commit=$_commit")
sha512sums=('SKIP')

build() {
  cd tenacity
  python setup.py build
}

check() {
  cd tenacity
  pytest
}

package() {
  cd tenacity
  python setup.py install --root="$pkgdir" --optimize=1
}
